package com.app.helijia;

import java.util.Date;

import com.app.widget.ReserveTimePicker;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;

public class DateTimePickerDialog {
  private final Activity activity;
  private final AlertDialog dialog;
  private final OnTimeSelectedListener listener;
  private final ReserveTimePicker picker;
  
  public DateTimePickerDialog(Activity paramActivity, OnTimeSelectedListener paramOnTimeSelectedListener) {
    this.activity = paramActivity;
    this.listener = paramOnTimeSelectedListener;
    this.picker = new ReserveTimePicker(paramActivity);
    this.dialog = new AlertDialog.Builder(paramActivity).setView(this.picker).setPositiveButton(17039370, new DialogInterface.OnClickListener() {
	      public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt) {
	         if (DateTimePickerDialog.this.listener != null){
	        	 DateTimePickerDialog.this.listener.onTimeSelected(DateTimePickerDialog.this.picker.getDate());
	         }
	          
		  }
    }).setNegativeButton(17039360, null).create();
  }

  public void show(){
	this.dialog.show();
  }

  public static abstract interface OnTimeSelectedListener {
	    public abstract void onTimeSelected(Date paramDate);
  }
}
